package com.kgc.service;

import com.github.pagehelper.PageInfo;
import com.kgc.entity.Category;
import com.kgc.entity.Product;

import java.util.List;
import java.util.Map;

public interface CategoryService {

    PageInfo<Category> selectCategoryBage(Map<String, Object> params);

    void allCategory();

    int addCategory(Category category);

    int updateCategory(Category category);

    int deleteCategory(int id);

    int getProductByCategoryId(int id);

    int getSonCountByCategoryId(int id);

    List<Category> getType1Category();

    List<Category> getType2Category(int id);

    Category getCategoryById(int id);

    Category getCategoryByName(String name, int type);

    List<Category> getType3Category(int id);

    List<Category> getAllCategoryAndChild();

    List<Product> getProductsByCategoryId(int id);

}
